package com.hospital.api;

import com.hospital.api.factory.RemoteFileFallbackFactory;
import com.hospital.common.core.constants.ServiceNameConstants;
import com.hospital.common.core.module.controller.vo.PatientReqEntity;
import com.hospital.common.core.module.entity.PatientInfo;
import com.hospital.common.core.result.Tip;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpServletRequest;

@FeignClient(contextId = "remoteEcardService",value = ServiceNameConstants.ECARD_SERVICE,fallbackFactory = RemoteFileFallbackFactory.class)
public interface EcardService {

    @PostMapping("/card/getInfo")
    public String getRemoteInfo(String requestVal, HttpServletRequest request);

    @PostMapping("/card/registerInfo")
    public String registerInfo(String requestVal);


    @PostMapping("/card/updateInfo")
    public Tip updateInfoNew(PatientReqEntity patientReqEntity, BindingResult bindingResult);


    @PostMapping("/card/updateInfoNew")
    public Tip updateInfo(PatientReqEntity patientReqEntity, BindingResult bindingResult);


    @PostMapping("/card/registerInfoNew")
    public String registerInfoNew(String requestVal);


    @PostMapping("/card/getInfoNew")
    public String getInfoNew(String requestVal);

    @GetMapping("/card/setWorkKey")
    public String setWorkKey();

    @GetMapping("/card/getPatientInfo")
    public PatientInfo getPatientInfo(String patientId);
}
